import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Solution {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        int mx = Arrays.stream(candies).max().getAsInt();
        int k = mx - extraCandies;
        List<Boolean> result = new ArrayList<>(candies.length);
        for(int c : candies){
            result.add(c >= k);
        }
        return result;
    }
}
